<#import "/ftl/mainAdmin.ftl" as page>

<@page.mainTemplate styleSheet="indtemuserCss" jsFile="indtemuserJs" current="个人用户">
	<!-- BEGIN CONTENT BODY -->
    <div class="page-content">
    	<!-- BEGIN PAGE HEAD-->
         <div class="page-head">
            <!-- BEGIN PAGE TITLE -->
            <div class="page-title">
              <#if consumerVO ?? >
             	 <h1><#if consumerVO.id=''>新建个人用户<#else>修改个人用户</#if>
                    <small><#if consumerVO.id=''>新建个人用户界面<#else>修改个人用户界面</#if></small>
                </h1>

                <#else>
                <h1>新建个人用户 修改个人用户
                    <small>新建个人用户界面 修改个人用户界面</small>
                </h1>
              </#if>

            </div>
            <!-- END PAGE TITLE -->
        </div>
        <!-- END PAGE HEAD-->
        <!-- BEGIN PAGE BREADCRUMB -->
        <ul class="page-breadcrumb breadcrumb">
        	<li>
                <a href="${context}/base/index_ftl">首页</a>
                <i class="fa fa-circle"></i>
            </li>
            <li>
                <span class="active">个人用户</span>
            </li>
        </ul>
        <!-- END PAGE BREADCRUMB -->
        <!-- BEGIN PAGE BASE CONTENT -->
        <div class="row">
            <div class="portlet light bordered">
                <div class="portlet-title">
                    <div class="caption">
                        基本信息</div>
                </div>
                <div class="portlet-body form edit-form">
                    <form action="#" class="horizontal-form createform" id="addInd" >
                     		<input type="hidden" class="form-control" placeholder="★请输入发薪日期" id="salary_date" name="salary_date"  value="1">
                            <input type="hidden" id="id"  name="id" value="${consumerVO.id}">
                            <input type="hidden" id="consumer_id"  name="consumer_id" value="${consumerVO.id}">

                            <input type="hidden" id="consumer_ature"   name="consumer_ature" value="PERSON">
                            <input type="hidden" id="data_status"  name="data_status" value="${consumerVO.data_status}">
                            <input type="hidden" id="view_status" name="view_status" value="${view}">
                            <input type="hidden" name="account_no" value="<#if consumerVO.bankVO ?? >${consumerVO.account_no}</#if>" >
                            <input type="hidden" name="account_no_status" value="<#if consumerVO.bankVO ?? >${consumerVO.account_no_status}</#if>" >
                            <div class="form-body">
	                            <div class="alert alert-danger display-hide">
	                                <button class="close" data-close="alert"></button> 表单含有错误. 请检查.
	                            </div>
	                            <div class="alert alert-success display-hide">
	                                <button class="close" data-close="alert"></button> 表单验证通过!
	                            </div>
                                <div class="row">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <label class="input-group-addon">用户ID</label>
                                                <div class="input-group-content">
                                                	<input type="text" id="consumer_code" class="form-control" placeholder="系统自动生成，全系统唯一" name="user_code" value="${consumerVO.consumer_code}" readonly>
                                            	</div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--/span-->
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <label class="input-group-addon">国籍</label>
                                            	<div class="input-group-content">
                                                	<input id="nationId" placeholder="★国籍" class="form-control input-inline nationality-suggest-input" name="nationality" value="${consumerVO.nationality}" <#if consumerVO.data_status!='DATA_NEW_ADD'></#if>>
				                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--/span-->
                                </div>
                                <div class="row">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <label class="input-group-addon">姓名</label>
                                                <div class="input-group-content">
                                                	<input type="text" id="consumer_name" class="form-control" placeholder="★姓名" name="consumer_name" value="${consumerVO.consumer_name}" <#if consumerVO.data_status!='DATA_NEW_ADD'></#if>>
                                            	</div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--/span-->
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <label class="input-group-addon">证件类型</label>
                                                <div class="input-group-content">
                                                    <select class="form-control input-inline" name="law_type" <#if consumerVO.data_status!='DATA_NEW_ADD'></#if>>
					                                    <option value="">★请选择</option>
					                                    <option value="IDENTITYCARD"  <#if consumerVO.law_type == 'IDENTITYCARD'> </#if>   selected >身份证</option>
					                                    <option value="OFFICER" <#if consumerVO.law_type == 'OFFICER'> selected</#if> >军官证</option>
					                                    <option value="POLICE" <#if consumerVO.law_type == 'POLICE'> selected</#if> >警官证</option>
					                                    <option value="HOUSEHOLD" <#if consumerVO.law_type == 'HOUSEHOLD'> selected</#if> >户口本</option>
					                                    <option value="PASSPORT" <#if consumerVO.law_type == 'PASSPORT'> selected</#if> >护照</option>
					                                    <option value="TEMPORARY" <#if consumerVO.law_type == 'TEMPORARY'> selected</#if> >临时证件</option>
					                                    <option value="OTHER" <#if consumerVO.law_type == 'OTHER'> selected</#if> >其它</option>

					                                </select>
				                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--/span-->
                                </div>
                                <div class="row">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <label class="input-group-addon">证件号码</label>
                                                <div class="input-group-content">
                                                	<input type="text" id="law_no" class="form-control" placeholder="★证件号码" name="law_no" value="${consumerVO.law_no}" <#if consumerVO.data_status!='DATA_NEW_ADD'></#if>>
                                            	</div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--/span-->
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <label class="input-group-addon">移动电话</label>
                                                <div class="input-group-content">
                                                	<input type="text" id="mobile_tel" <#if consumerVO.data_status=='DATA_AVALIABLE'||consumerVO.data_status=='DATA_DELETE'></#if> class="form-control" placeholder="★移动电话" name="mobile_tel" value="${consumerVO.mobile_tel}">
                                            	</div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--/span-->
                                </div>
                                <div class="row">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <label class="input-group-addon">办公电话</label>
                                                <div class="input-group-content">
                                                	<input type="text" id="office_tel" class="form-control" placeholder="★办公电话" name="office_tel" value="${consumerVO.office_tel}">
                                            	</div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--/span-->
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <label class="input-group-addon">所属公司</label>
                                                <div class="input-group-content">
                                                    <select class="form-control input-inline" placeholder="★请输入所属公司" id="comID" name="company_id" >
					                                    	 <option value="${consumerVO.company_id}">${consumerVO.company_name}</option>
					                                </select>
				                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--/span-->
                                </div>
                                <div class="row">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <label class="input-group-addon">E-mail</label>
                                                <div class="input-group-content">
                                                	<input type="text" id="email" <#if consumerVO.data_status=='DATA_AVALIABLE'||consumerVO.data_status=='DATA_DELETE'></#if> class="form-control" placeholder="★E-mail" name="email" value="${consumerVO.email}">
                                            	</div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--/span-->
                                     <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <label class="input-group-addon">建立日期</label>
                                                <div class="input-group-content">
				                                    <div class="input-group">
				                                        <input type="text" class="form-control" id="start-time" name="create_date"
				                                        value="${consumerVO.dateToString(consumerVO.create_date)}" disabled="disabled">
				                                    </div>
				                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--/span-->
                                </div>
                                <div class="row">

                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <label class="input-group-addon">备注</label>
                                                <div class="input-group-content">
                                                	<input type="text" id="remark" class="form-control" placeholder="备注" name="remark" value="${consumerVO.remark}">
                                            	</div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <!--<h4 class="form-section">开户信息</h4>-->
<div class="portlet-title" style="border-bottom: 1px solid #eef1f5;padding: 0;min-height: 48px;margin-bottom: 29px;">
    <div class="caption" style="color: #666;padding: 10px 0;float: left;display: inline-block;font-size: 18px;line-height: 18px;">开户信息</div>
</div>

                                   <input type="hidden" id="user_bank_id" name="bank.id"  value="<#if consumerVO.bankVO ?? >${consumerVO.bankVO.id} </#if>">
                                  <input type="hidden" id="bankStatus" name="status"  value="<#if consumerVO.bankVO ?? >${consumerVO.bankVO.data_status} </#if>">
                               <div class="row">
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <label class="input-group-addon">开户渠道</label>
                                                <div class="input-group-content">
                                                	<select class="form-control input-inline" id="channel_type" name="channel_type" >
					                                    <#if consumerVO.channelTypeVO ?? >
					                                   		<option value="${consumerVO.channelTypeVO.relation_string_num}">${consumerVO.channelTypeVO.remark}</option>
					                                    </#if>
					                                     <#if consumerVO.channelTypeVO == null>
	                                                	  	<option value="">★请选择</option>
					                                    	<#list type_list as type>
					                                    		<option value="${type.config_value}">${type.config_desc}</option>
										                    </#list>
										                 </#if>
					                                </select>
                                            	</div>
                                            </div>
                                        </div>
                                    </div>
<div class="col-md-6">
    <div class="form-group">
        <div class="input-group">
            <label class="input-group-addon">开户名称</label>
            <div class="input-group-content">
                <input type="text" id="bank_consumer_name"
                       class="form-control" name="bank.bank_consumer_name" placeholder="开户名称与姓名一致 " value="<#if consumerVO.bankVO ?? >${consumerVO.bank_consumer_name}</#if>" readOnly >
            </div>
        </div>
    </div>
</div>
                                </div>
                                <div class="row">
                                    <div class="col-md-6">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <label class="input-group-addon">开户账号</label>
                                                    <div class="input-group-content">
                                                    	<input type="text" id="account_no" <#if consumerVO.data_status=='DATA_AVALIABLE'||consumerVO.data_status=='DATA_DELETE'></#if> class="form-control" name="bank.card_num" placeholder="★开户账号" value="<#if consumerVO.bankVO ?? >${consumerVO.card_num_str}</#if>">
                                                	</div>
                                                </div>
                                            </div>
                                        </div>
<div class="col-md-6">
    <div class="form-group">
        <div class="input-group">
            <label class="input-group-addon">开户行名称</label>
            <input type="hidden" id="cls_bank_name" name="bank.cls_bank_name" class="form-control"
                   value="<#if consumerVO.bankVO ?? >${consumerVO.cls_bank_name}</#if>"  data-code='<#if consumerVO.bankVO ?? >${consumerVO.cls_bank_code}</#if>'>
            <div class="input-group-content">
                <select name="bank.cls_bank_code"  id="cls_bank_code" class="form-control">
                    <option value="${consumerVO.cls_bank_code}" selected>${consumerVO.cls_bank_name}</option>
                </select>
            </div>
        </div>
    </div>
</div>
</div>
                                <div class="row">
                                     <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <label class="input-group-addon">开户支行省市</label>
                                                <input type="hidden" class="form-control" id="province_name" value="<#if consumerVO.bankVO ?? >${consumerVO.province_name}</#if>"
                                                data-code='<#if consumerVO.bankVO ?? >${consumerVO.province_code}</#if>' >
                                           		<input type="hidden" id="city_name" class="form-control"  value="<#if consumerVO.bankVO ?? >${consumerVO.city_name}</#if>"
                                           		data-code='<#if consumerVO.bankVO ?? >${consumerVO.city_id}</#if>'>
                                           		<div class="input-group-content">
	                                                <div class="col-md-6 plr0">
	                                                    <select  id="province_code"  name="bank.province_code" <#if consumerVO.data_status=='DATA_AVALIABLE'||consumerVO.data_status=='DATA_DELETE'></#if>class="form-control input-inline">
	                                                     <option value="${consumerVO.province_code}" selected>${consumerVO.province_name}</option>
	                                                    </select>
	                                                </div>
	                                                <div class="col-md-6 plr0">
	                                                    <select id="city_code" name="bank.city_id" class="form-control input-inline"
	                                                     <#if consumerVO.data_status=='DATA_AVALIABLE'||consumerVO.data_status=='DATA_DELETE'></#if>  >
	                                                       <option value="${consumerVO.city_id}" selected>${consumerVO.city_name}</option>
	                                                    </select>
	                                                </div>
	                                            </div>
                                            </div>
                                        </div>
                                    </div>
<div class="col-md-6">
    <div class="form-group">
        <div class="input-group">
            <label class="input-group-addon">开户支行名称</label>
            <input type="hidden" id="brank_bank_name" class="form-control"  name="brank_bank_name"
                   value="<#if consumerVO.bank ?? >${consumerVO.bankVO.bank_name}</#if>" data-code='<#if consumerVO.bankVO ?? >${consumerVO.bank_id}</#if>'>
            <div class="input-group-content">
                <select  id="brank_bank_code" <#if consumerVO.data_status=='DATA_AVALIABLE'||consumerVO.data_status=='DATA_DELETE'></#if> name="bank.bank_id" class="form-control">
            <option value="<#if consumerVO.bankVO ?? >${consumerVO.bank_id}</#if>"><#if consumerVO.bankVO ?? >${consumerVO.bank_name}</#if></option>
            </select>
        </div>
    </div>
</div>
</div>
                                </div>
                                <div class="row">
                                    <div class="col-md-6">
                                            <div class="form-group">
                                                <div class="input-group">
                                                    <label class="input-group-addon">账户性质</label>
                                                    <div class="input-group-content">
                                                        <select  id="account-type"  class="form-control" name="consumer_type" placeholder="账户性质">
	                                                        <option value="PERSON" selected>个人户</option>
                                                        </select>
                                                	</div>
                                                </div>
                                            </div>
                                        </div>
                                </div>
                                	<div>
		                           	   <#if consumerVO.bankVO ?? >
		                           	      <#if consumerVO.bankVO.bank_info ?? >
		                           	        <#if consumerVO.bankVO.bank_info.status ?? >
		                           	          <#if consumerVO.bankVO.bank_info.status=='2' >
		                           	       		 支行信息已经失效，请及时更换
		                           	       	  </#if>
		                           	        </#if>
		                           	      </#if>
		                           	   </#if>
		                           	</div>
                                <!--<h4 class="form-section">子账户信息</h4>-->
<div class="portlet-title" style="border-bottom: 1px solid #eef1f5;padding: 0;min-height: 48px;margin-bottom: 29px;">
    <div class="caption" style="color: #666;padding: 10px 0;float: left;display: inline-block;font-size: 18px;line-height: 18px;">子账户信息</div>
</div>
                                <div class="row">
                                	<div class="col-md-6">
                                         <div class="form-group">
                                           		<div class="input-group">
                                                  	<label class="input-group-addon">子账户</label>
                                                  	<div class="input-group-content">
                                                    	<input type="text" id="" class="form-control" name="account_no" placeholder="开通子账户后显示账号信息" value="<#if consumerVO.bankVO ?? >${consumerVO.bank_account_no_str}</#if>" disabled="disabled">
                                                	</div>
                                                </div>
                                          </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="checkbox-list">
                                         <#if view =='toView'>
                                            <span class="checkbox-inline">  用户状态 : <strong> <#if consumerVO.data_status_str=="">新增<#else>${consumerVO.data_status_str}</#if></strong></span>
                                            <span class="checkbox-inline">  三要素验证 : <strong><#if consumerVO.data_status_str=="">未验证<#else>${consumerVO.key_validate_str}</#if></strong></span>
                                            <span class="checkbox-inline">  基金状态 : <strong><#if consumerVO.data_status_str=="">未启用<#else>${consumerVO.fund_status_str}</#if></strong></span>
                                         </#if>
                                        </div>
                                    </div>
                                </div>
                           	</div>

                            <div class="form-actions top">
                                <div class="row" style="text-align:center";>
                                       <#if view !='toView'>
                                         <button type="submit" class="btn green" id="indSave">保存</button>
                                        </#if>
                                        <a href="${context}/perConsumer/individualConsumer" class="btn default">返回</a>
                                </div>
                            </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!-- END CONTENT BODY -->

</@page.mainTemplate>